package com.ld.zxw.service;

import java.util.HashMap;
import java.util.List;

import org.apache.lucene.document.Document;
import org.apache.lucene.index.Term;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.Sort;

import com.alibaba.fastjson.JSONArray;
import com.ld.zxw.page.Page;

import test.User;

/**
 * lucene 操作接口
 * @author Administrator
 *
 */
@SuppressWarnings("all")
public interface LuceneService {

	<T> boolean saveObjs(List<T> objs);

	boolean saveDocuments(List<Document> documents);

	boolean delAll();

	boolean delKey(Term term);

	boolean delKey(Query query);

	<T> boolean updateObjs(List<T> objs, Term term);

	<T> List<T> findList(Query query, Class<T> obj, int num, Sort sort);

	<T> Page<T> findList(Query query, int pageNumber, int pageSize, Class<T> obj, Sort sort);

	boolean updateDocuments(List<Document> objs, Term term);
	
}
